home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
visual2a
/
menu.frm
< prev
next >
Wrap
Text File
|
1999-09-25
|
12KB
|
397 lines
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.Form Menu
BorderStyle = 1 'Fixed Single
Caption = "Options"
ClientHeight = 3390
ClientLeft = 0
ClientTop = -60
ClientWidth = 4680
Icon = "Menu.frx":0000
LinkTopic = "Form2"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
Moveable = 0 'False
ScaleHeight = 3390
ScaleWidth = 4680
ShowInTaskbar = 0 'False
Begin VB.CheckBox Check3
Caption = "Screen Saver &Mode"
Height = 255
Left = 240
TabIndex = 12
Top = 3840
Width = 2535
End
Begin VB.CommandButton Command4
Caption = "&Cancel"
Height = 495
Left = 2400
TabIndex = 14
Top = 4200
Width = 2055
End
Begin VB.CommandButton Command3
Caption = "Save &Options"
Height = 495
Left = 240
TabIndex = 13
Top = 4200
Width = 2055
End
Begin VB.CommandButton Command2
Caption = "Change &PassWord"
Height = 315
Left = 2040
TabIndex = 11
Top = 3480
Width = 2415
End
Begin VB.CheckBox Check2
Caption = "&Require PassWord"
Height = 255
Left = 240
TabIndex = 10
Top = 3480
Width = 1815
End
Begin VB.CheckBox Check1
Caption = "&Delete Trails"
Height = 255
Left = 240
TabIndex = 2
Top = 960
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "C&lear Screen"
Height = 315
Left = 3000
TabIndex = 9
Top = 3000
Width = 1455
End
Begin VB.ComboBox Combo1
Height = 315
ItemData = "Menu.frx":0442
Left = 1440
List = "Menu.frx":0455
Style = 2 'Dropdown List
TabIndex = 8
Top = 3000
Width = 1455
End
Begin ComctlLib.Slider Slider1
Height = 495
Left = 120
TabIndex = 1
Top = 360
Width = 4335
_ExtentX = 7646
_ExtentY = 873
_Version = 327682
LargeChange = 1
Min = 1
SelStart = 1
Value = 1
End
Begin ComctlLib.Slider Slider2
Height = 495
Left = 120
TabIndex = 4
Top = 1560
Width = 4335
_ExtentX = 7646
_ExtentY = 873
_Version = 327682
LargeChange = 1
Max = 50
End
Begin ComctlLib.Slider Slider3
Height = 495
Left = 120
TabIndex = 6
Top = 2400
Width = 4335
_ExtentX = 7646
_ExtentY = 873
_Version = 327682
LargeChange = 1
Min = 2
Max = 4
SelStart = 2
Value = 2
End
Begin VB.Label Label4
Caption = "&Number of Sides:"
Height = 255
Left = 240
TabIndex = 5
Top = 2160
Width = 2295
End
Begin VB.Label Label3
Caption = "&Trail Size"
Height = 255
Left = 240
TabIndex = 3
Top = 1320
Width = 2295
End
Begin VB.Label Label2
Caption = "Line &Style:"
Height = 255
Left = 240
TabIndex = 7
Top = 3045
Width = 1215
End
Begin VB.Label Label1
Caption = "Line &Width:"
Height = 255
Left = 240
TabIndex = 0
Top = 120
Width = 2295
End
Begin VB.Menu mnuFile
Caption = "File"
Visible = 0 'False
Begin VB.Menu mnuOptions
Caption = "&Options"
End
Begin VB.Menu SP1
Caption = "-"
End
Begin VB.Menu mnuAbout
Caption = "&About"
End
Begin VB.Menu SP2
Caption = "-"
End
Begin VB.Menu mnuExit
Caption = "&Exit"
End
End
End
Attribute VB_Name = "Menu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Compare Text
Private Sub mnuAbout_Click()
'Generate a standard About Message Box
MsgBox "Programmed by Pedro Lamas" & vbCrLf & "Copyright ⌐1997-1999 Underground Software", vbApplicationModal + vbInformation, "Credits!"
'Enable the Drawing Timer
BlackBoard.Timer1.Enabled = True
End Sub
Private Sub Check1_Click()
'If the "Delete Trails" option is checked
If Check1.Value = 1 Then
'Enable the "Trails Size" Slider and the corresponding
'Label
Slider2.Enabled = True
Label3.Enabled = True
'Update the "Delete Lines" variable
DelLines = True
Else
'Disable the "Trails Size" Slider and the corresponding
'Label
Slider2.Enabled = False
Label3.Enabled = False
'Update the "Delete Lines" variable
DelLines = False
End If
'Redraw the Mistify
BlackBoard.Calc (2)
End Sub
Private Sub Check2_Click()
'Update the "Require Password" variable
P = -Check2.Value
End Sub
Private Sub Check3_Click()
'Update the "Screen Saver Mode Variable" variable
SS = -Check3.Value
End Sub
Private Sub Combo1_Click()
'Update the "Line Style" variable
DrawStyle = Combo1.ListIndex
'Clear the screen
BlackBoard.Cls
End Sub
Private Sub Command1_Click()
'Clear the screen
BlackBoard.Cls
End Sub
Private Sub Command2_Click()
'Local variable declaration
Dim S As String, SC As String
'If there is a already a password
If PSWD <> "" Then
'Ask for the current password
S = InputBox("Please enter the CURRENT PassWord:", "Change PassWord", "")
'Check if Cancel was pressed. If so, exit the Sub
If S = "" Then Exit Sub
'Check if the password is correct
If S <> PSWD Then
'Generate a Message Box, indicating an incorrect password
'and exit this Sub
MsgBox "Incorrect Password!", vbApplicationModal + vbCritical, "Change PassWord"
Exit Sub
End If
End If
aqui:
'Ask for the new password
S = InputBox("Please enter the NEW PassWord:", "Change PassWord", "")
'Check if Cancel was pressed. If so, exit the Sub
If S = "" Then Exit Sub
'Ask for password confirmation
SC = InputBox("Please re-enter the NEW PassWord:", "Change PassWord", "")
'Check if Cancel was pressed. If so, exit the Sub
If SC = "" Then Exit Sub
'Confirm the entered passwords
If S <> SC Then
'If the passwords are different, generate an Error
'Message Box and go back to ask for the new password
MsgBox "PassWord not Checked!", vbApplicationModal + vbCritical, "Change PassWord"
GoTo aqui
End If
'Update the "Password" variable
PSWD = S
End Sub
Private Sub Command3_Click()
'OK was pressed. Save all options to the registry
SaveSetting "G